<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>手工迭代</title>
		<script src="../js/jquery-3.6.3.min.js"></script>
		<script>
			$(function(){
				let d=$("div");
				alert(d.length);
				//$.each;//d.each
				d.each(function(a,b){
					//console.log(a,b);
					//b.innerHTML="这是第"+a+"个div";
					$(b).html("这是第"+(a+1)+"个div");
					//返回false,循环停止
					if(a>=7)
						return false;
					return true;
				});
				d.get(3).style.color="yellow";
				$("div:eq(6)").css("font-size","60px");
			});
		</script>
	</head>
	<body>
		 <div></div>
		 <div></div>
		 <div></div>
		 <div></div>
		 <div></div>
		 <div></div>
		 <div></div>
		 <div>4</div>
		 <div>3</div>
		 <div>2</div>
		 <div>1</div>
	</body>
</html>